<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" lang="">
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<div th:fragment="html">
    <script th:inline="javascript"> var ctx = [[@{/}]]; </script>
    <base th:href="@{/}"/>
    <script th:src="@{/component/layui/layui.js}"></script>
    <script th:src="@{/work/js/common.js}"></script>
    <link rel="stylesheet" th:href="@{/admin/css/pearCommon.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearButton.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearForm.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearFrame.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearLoad.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearSelect.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearSocial.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearStep.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearTab.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearTable.css}" media="all">
    <link rel="stylesheet" th:href="@{/admin/css/pearTheme.css}" media="all">
    <link rel="stylesheet" th:href="@{/component/layui/css/layui.css}" media="all">
    <script th:src="@{/work/js/ace.js}"></script>
    <link rel="stylesheet" th:href="@{/work/css/cropper.css}">
    <link rel="stylesheet" th:href="@{/work/css/common.css}" media="all">
    <style type="text/css">
        ::-webkit-scrollbar-track-piece {
            /*滚动条凹槽的颜色，还可以设置边框属性*/
            background-color: #f8f8f8;
        }

        ::-webkit-scrollbar {
            /*滚动条的宽度*/
            width: 9px;
            height: 9px;
        }

        ::-webkit-scrollbar-thumb {
            /*滚动条的设置*/
            background-color: #dddddd;
            background-clip: padding-box;
            min-height: 28px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background-color: #bbb;
        }
    </style>
    <script th:inline="javascript">
        var $ = top.layui.$;
        var topLayer = top.layui.layer;
        var bodyTab = null;
        /*<![CDATA[*/
        var active = [[${active}]];
        /*]]>*/
        /*layui.config({
            base: active === 'dev' ? 'component/' : 'component/' //静态资源所在路径
            , version: active === 'dev' ? new Date().getTime() : '1.0.0'
        }).use(function () {*/
        layui.use(['jquery'], function () {
            var index;
            $ = layui.$;
            $.ajaxSetup({
                beforeSend: function () {
                    //loading层
                    index = layer.load(1, {
                        shade: [0.1, '#fff'] //0.1透明度的白色背景
                    });
                },
                complete: function () {
                    layer.close(index);
                },
                error: function () {
                    layer.close(index);
                }
            });
            //页面跳转
            $('body').on('click', '*[lay-href]', function () {
                var othis = $(this)
                    , href = othis.attr('lay-href')
                    , text = othis.attr('lay-text')
                    , router = layui.router();
                if (href !== 'javascript:;' && href !== '#') {
                    if ($(window).width() <= 768) {
                        // sideMenu.collaspe();
                        if ($(".pear-admin").is(".pear-mini")) {
                            $(".layui-icon-spread-left").addClass("layui-icon-shrink-right");
                            $(".layui-icon-spread-left").removeClass("layui-icon-spread-left");
                            $(".pear-admin").removeClass("pear-mini");
                        } else {
                            $(".layui-icon-shrink-right").addClass("layui-icon-spread-left");
                            $(".layui-icon-shrink-right").removeClass("layui-icon-shrink-right");
                            $(".pear-admin").addClass("pear-mini");
                        }
                    }
                    if (bodyTab == null) {
                        bodyTab = top.bodyTab;
                    }
                    bodyTab.addTabOnly({
                        id: href,
                        title: (text || othis.text()) || othis.parent().attr("data-name"),
                        url: href,
                        icon: '',
                        close: true
                    }, 300);
                }
            });
            // 移除loading动画
            /*setTimeout(function () {
                layui.$(".page-loading").hide();
            }, window === top ? 600 : 100);*/
        });
    </script>
    <div class="page-loading" style="display: none">
        <div class="ball-loader" align="center" style="text-align: center">
            <img src="work/img/loading.gif" style="width: 300px;">
        </div>
    </div>
</div>

